package com.scalar.chiptrack.operations.reports;

import java.math.BigDecimal;

/**
 * User: sujankumar.suppala
 * Date: Apr 5, 2006
 * Time: 3:43:16 PM
 */
public class WorkOrder
{
    String  woNumber;
    String  woRelDate;
    int     woQtyOpen;
    String  stage;
    String  sod;//ship out date
    String  partNumber;
    long     shippableMB;

    public String getWoNumber()
    {
        return woNumber;
    }

    public void setWoNumber(String woNumber)
    {
        this.woNumber = woNumber;
    }

    public String getWoRelDate()
    {
        return woRelDate;
    }

    public void setWoRelDate(String woRelDate)
    {
        this.woRelDate = woRelDate;
    }

    public int getWoQtyOpen()
    {
        return woQtyOpen;
    }

    public void setWoQtyOpen(int woQtyOpen)
    {
        this.woQtyOpen = woQtyOpen;
    }

    public String getStage()
    {
        return stage;
    }

    public void setStage(String stage)
    {
        this.stage = stage;
    }

    public String getSod()
    {
        return sod;
    }

    public void setSod(String sod)
    {
        this.sod = sod;
    }

    public String getPartNumber()
    {
        return partNumber;
    }

    public void setPartNumber(String partNumber)
    {
        this.partNumber = partNumber;
    }

    public long getShippableMB()
    {
        return shippableMB;
    }

    public void setShippableMB(long shippableMB)
    {
        this.shippableMB = shippableMB;
    }

    public double getTerabytes ()
    {
        double terabytes = (shippableMB)/(1024*1024f);
        final int DECIMAL_PLACES = 4;
        try
        {
            BigDecimal bigDec = new BigDecimal(terabytes);
            BigDecimal roundedBigDec = bigDec.setScale( DECIMAL_PLACES, BigDecimal.ROUND_HALF_UP );
            terabytes = roundedBigDec.doubleValue();
        }
        catch ( Exception e ){}
        return terabytes;
    }
}
